package org.springrain.selenium.service;

import java.util.List;

import org.openqa.selenium.WebDriver;
import org.springrain.frame.util.Page;
import org.springrain.selenium.entity.Htmloperation;
import org.springrain.selenium.entity.Htmloperationcollection;
import org.springrain.system.service.IBaseSpringrainService;

/**
 * TODO 在此加入类描述
 * 
 * @copyright {@link weicms.net}
 * @author springrain<Auto generate>
 * @version 2018-05-21 20:17:39
 * @see org.springrain.selenium.service.Htmloperation
 */
public interface IHtmlSeleniumService extends IBaseSpringrainService {

	/**
	 * 根据ID查找
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	Htmloperation findHtmloperationById(String id) throws Exception;

	/**
	 * 根据ID查找
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	Htmloperationcollection findHtmloperationcollectionById(String id) throws Exception;

	/**
	 * 根据businessId查询需要执行的操作
	 * 
	 * @param businessId
	 * @return
	 * @throws Exception
	 */

	List<Htmloperation> findListBybusinessId(String businessId, Page page) throws Exception;

	/**
	 * 根据businessId查询需要执行的操作,List是最后需要执行的所有操作
	 * 
	 * @param businessId
	 * @param list
	 * @return
	 * @throws Exception
	 */

	String updateExecOperationBybusinessId(String businessId, List<Htmloperation> list) throws Exception;

	/**
	 * 执行批量的动作
	 * 
	 * @param list
	 * @return
	 * @throws Exception
	 */
	String updateExecOperationList(List<Htmloperation> list, String businessId, String execId) throws Exception;

	/**
	 * 根据Id查找名称
	 * 
	 * @param operationId
	 * @return
	 * @throws Exception
	 */
	String findOperationNameById(String operationId) throws Exception;

	/**
	 * 根据Id查找名称
	 * 
	 * @param operationId
	 * @return
	 * @throws Exception
	 */
	String findOperationCollectionNameById(String operationCollectionId) throws Exception;

	/**
	 * 保存操作集的树形结构
	 * 
	 * @param htmloperationcollection
	 * @return
	 * @throws Exception
	 */
	String saveHtmloperationcollection(Htmloperationcollection htmloperationcollection) throws Exception;

	/**
	 * 修改操作集的树形结构
	 * 
	 * @param htmloperationcollection
	 * @return
	 * @throws Exception
	 */
	Integer updateHtmloperationcollection(Htmloperationcollection htmloperationcollection) throws Exception;

	/**
	 * 保存操作
	 * 
	 * @param htmloperation
	 * @return
	 * @throws Exception
	 */
	String saveHtmloperation(Htmloperation htmloperation) throws Exception;

	/**
	 * 修改操作
	 * 
	 * @param htmloperation
	 * @return
	 * @throws Exception
	 */
	Integer updateHtmloperation(Htmloperation htmloperation) throws Exception;

	/**
	 * 判断条件的表达式,返回Boolean结果
	 * 
	 * @param conditionStr
	 * @param driver
	 * @return
	 */

	Boolean execCondition(String conditionStr, WebDriver driver);

}
